#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QIntValidator>
#include <QStandardItemModel>
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_generator_clicked();
    void copyData();
    void on_output_clicked();

    void on_clear_clicked();

private:
    bool ValidateData();
    long double Calculate(int R, int h);
    void SaveFile();
    void ResetTable();
private:
    Ui::MainWindow *ui;
    double PI;
    long Diff;
    long Radius;
    long Length;

    int index;

    QIntValidator *radiusLimmit;
    QIntValidator *lengthLimmit;
    QIntValidator *diffLimmit;

    QStandardItemModel  *model;
    QAction *copyAct;
};

#endif // MAINWINDOW_H
